#include <iostream>
#include <set>
#include <vector>
#include <algorithm>
using namespace std;

int main()
{
    int n;
    cin>>n;
    set<string>people;
    vector<string>shuai;
    for (int i=0;i<n;i++)
    {
        int p;
        cin>>p;
        for (int i=0;i<p;i++)
        {

            string s;
            cin>>s;
            if (p==1)
                break;
            people.insert(s);
        }
    }
    int m;
    cin>>m;

    for (int i=0;i<m;i++)
    {
        string s;
        cin>>s;
        if (people.find(s)==people.end()&&find(shuai.begin(),shuai.end(),s)==shuai.end())
            shuai.push_back(s);
    }
    if (shuai.empty())
        cout<<"No one is handsome";
    else
    {
        for (int i=0;i<shuai.size();i++)
        {
            if (i==0)
                cout<<shuai[0];
            else
                cout<<" "<<shuai[i];
        }
    }
}